<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
					<style type="text/css">
			.buttonC {
				text-align: left
			}
			
			.pagetable {
				font-size: 12px;
			}
			</style>
					<style type="text/css">
			@import "css/rep.css";
			</style>
			<style type="text/css">@import "css/rep.css";</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/rep.js"></script>
	<script type="text/javascript" src="js/repStyle.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
	</head>

	<body>
		<s:form action="ComAction.action" method="post" theme="simple">

			<table class="pagetable">
				<tr>

					<td>
						公司名称:
						<s:textfield name="query_comname" style="width:70px;" />
					</td>
					<td>
						公司性质：
						<s:select theme="simple" label="公司性质" list="#session.map_com_prpt" name="comPro" listKey="key" listValue="value" headerKey="" headerValue="%{#comPro}" emptyOption="false" />
					</td>
					<td>
						地区：
						<s:textfield name="query_distric" style="width:70px;" />
					</td>
					<td>
						所属分公司：
						<s:select  label="公司"  list="#session.subcom_list" name="query_blongto" listKey="id" listValue="comName"  headerKey="-1" headerValue="%{#query_blongto}" emptyOption="false"/>
                    
					</td>
					<td>
						<s:submit value="查询" method="toGetComList" onclick='setfistpage()' />
						<input type=button value="导出" onclick=	'Copy2Excel(myTable);'>
					</td>

				</tr>
			</table>

			<table id="myTable" class="tablesorter">
				<thead>
					<tr>
						<th>
							ID
						</th>
						<th>
							公司名称
						</th>
						<th>
							简称
						</th>
						<th>
							性质
						</th>
						<th>
							地区
						</th>
						<th>
							类型
						</th>
						<th>
							地址
						</th>
						<th>
							单边运输距离
						</th>
						<th>
							客户放热温度
						</th>
						<th>

						</th>

					</tr>
				</thead>
				<tbody>
					<s:iterator id="list" value="list">
						<tr>
							<td>
								<s:property value="id" />
							</td>
							<td>
								<s:property value="comName" />
							</td>
							<td>
								<s:property value="comAb" />
							</td>
							<td>
								<s:select theme="simple" label="公司性质"
									list="#session.map_com_prpt" name="comProperty" listKey="key"
									listValue="value" headerValue="comProperty" emptyOption="false" />

							</td>
							<td>
								<s:property value="comDistrict" />
							</td>
							<td>
								<s:property value="comType" />
							</td>
							<td>
								<s:property value="comAddress" />
							</td>

							<td>
								<s:property value="extAttr1" />
							</td>
							<td>
								<s:property value="extAttr2" />
							</td>

							<td>
								<a href="ComAction!findbyid.action?id=<s:property value="id"/>">编辑</a>
							</td>

							<!-- <a href="ComAction!delete?id=<s:property value="id"/>">删除</a> -->

						</tr>
					</s:iterator>
				</tbody>
			</table>
			  
      <!-----------------------分页部分---------------------------------------->
      
      
		<table width="850" border="0" class="pagetable">
			  	<tr>
			    	<td>　				
								
							当前第<s:property value="page"/> 页,共<s:property value="planNum"/>条记录, 共分<s:property value="totalPage"/>页
					
				<input type="hidden" name="maxNum" value="">
			    	<input type="hidden" name="page" id="page" value="<s:property value="page"/>">
			    		
						<s:submit value="首页" onclick='setfistpage()' method="toGetComList"></s:submit>	
						<s:if test="page<=1">
						上一页
						</s:if>
						<s:else>
							<s:submit value="上一页" onclick='setlastpage(%{page})' method="toGetComList"></s:submit>		
							
						</s:else>
								
						<s:if test="page>=totalPage">
						 下一页
						</s:if>
					    <s:else>
						<s:submit value="下一页"  onclick='setnextpage(%{page})' method="toGetComList"></s:submit>	
				
					    </s:else>
						<s:submit value="尾页" onclick='settaltolpage(%{totalPage})' method="toGetComList"></s:submit>	
						
						</td>
					
			</table>
        <!-----------------------分页部分---------------------------- -->
			
		</s:form>

	</body>
</html>
